//
//  ADSRGenerator.h
//  CocoaSynth
//
//  Created by Pierre DUCHENE on 17/02/10.
//  Copyright 2010 Pierre DUCHENE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "Module.h"
#import "ModuleADSRProtocol.h"

/*!
    @class       ADSRGenerator 
    @superclass  NSObject
    @abstract    This class is a strategy. This class produce an envelopp ADSR. 
*/
@interface ADSRGenerator : NSObject {
	// The module wich is attach the generator
	Module<ModuleADSRProtocol>* module;
	
	// State of ADSR, RUN or IDLE
	BOOL isRunning;
	BOOL stateHasChanged;
	
	// Attribute for ADSR computation
	float sustainDuration;
	BOOL ancienZero;
}

@property (retain) Module<ModuleADSRProtocol>* module;

@end
